/***************************************************************************
创建者：华磊
 开始时间：               : 2020.1１.09
 copyright            : (C) 深圳市华友高科有限公司
 修改说明：（每次有修改就添加一条，带有 修改人，修改时间，修改描述）

 ***************************************************************************
 *   底部视窗测试用代理类
*                                                                         *
 ***************************************************************************/
#ifndef BOTTOMVIEWDELEGATE_H
#define BOTTOMVIEWDELEGATE_H

//#include "bottomviewdelegate_global.h"BOTTOMVIEWDELEGATESHARED_EXPORT
#include <QObject>
#include <QMutex>
#include <QTimer>
#include <QApplication>
#include "../bottomview/bottomview.h"
#include "../CommunicateDelegate/globaldata.h"

class  BottomViewDelegate : public QObject
{
    Q_OBJECT

public:
    BottomViewDelegate(BottomView *bottomViewIn,GlobalData *globalDataIn,
                       CommunicateNormalDelegate *communicateNormalIn,QObject* parent=0);
    ~BottomViewDelegate();

private:
    QTranslator translator;

public slots:

    void button1Slot();
    void button2Slot();
    void button3Slot();
    void button4Slot();
    void button5Slot();

    void buttonDebugSlot();

    void updateViewSlot(int currentStatus);

    void setRunAllowSlot(bool check);

    //
    void zeroTimeWork();

signals:
    void sendRunSignal();
    void sendStopSignal();
    void sendPauseSignal();
    void sendReturnZeroSignal();
    void sendReturnPageSignal();

    /**
     * @brief changeViewIDsignal                通知mid delegate修改窗口显示
     */
    void changeViewIDsignal();
    //void changeViewIDsignal(int id);

    /**
     * @brief msgBoxSignal                      通知 打开消息框
     */
    void msgBoxSignal(int type,QString title,QString text);

public slots:

    void changeLanguageSlot(int language);
private:
    /**
     * @brief initConnect       初始化槽链接
     */
    void initConnect();

private:
    BottomView *bottomView;
    GlobalData *globalData;

    int tmpCurrentStatus;       //缓存显示状态
    QTimer *zeroCheckTimer;
    int zeroCheckCount;
    CommunicateNormalDelegate *communicateNormal;

};

#endif // BOTTOMVIEWDELEGATE_H
